﻿@model IEnumerable<SuCasa.Models.CourseViewModel>

@{
    ViewBag.Title = "List";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div class="page-header">
	<h2>Courses</h2>
</div>
		<p>
			@Html.ActionLink("Add Course", "Add", null, new {@class="btn btn-primary"})
		</p>
		<table class="table table-striped table-bordered">
			<thead>
				<tr>
					
					<th>
						Name
					</th>
					<th>
						Semester
					</th>
					<th>
						Location
					</th>
					<th>
						Description
					</th>
					<th>
						Schedule Notes
					</th>
					<th>
						Minimum Age
					</th>
					<th>
						Maximum Age
					</th>
					<th>
						Capacity
					</th>
					<th>
						Is Daycare?
					</th>
				</tr>
			</thead>
			<tbody>

@foreach (var item in Model) {
				<tr>
                 
					<td>
						 @Html.ActionLink(item.Name, "Details",  new { id=item.CourseId })
					</td>
					<td>
						@item.Semester
					</td>
					<td>
						@item.Location
					</td>
					<td>
						@item.Description
					</td>
					<td>
						@item.ScheduleNotes
					</td>
					<td>
						@item.MinimumAge
					</td>
					<td>
						@item.MaximumAge
					</td>
					<td>
						@item.Capacity
					</td>
					<td>
						@item.IsDaycare
					</td>
			</tr>
}
		</tbody>
	</table>

